package hrm.serviceimple;

import hrm.dao.ZipcodeDAO;
import hrm.daoimple.ZipcodeDAOImple;
import hrm.dto.code.ZipcodeDTO;
import hrm.service.ZipcodeService;

import java.util.List;

public class ZipcodeServiceImple implements ZipcodeService {
	private ZipcodeDAO zipcodeDAO;
	private static ZipcodeServiceImple zipcodeService;
	
	private ZipcodeServiceImple(){
		zipcodeDAO=new ZipcodeDAOImple();
	}
	
	public static ZipcodeServiceImple getInstance(){
		if (zipcodeService==null) {
			zipcodeService=new ZipcodeServiceImple();
		}
		return zipcodeService;
	}

	public void setZipcodeDAO(ZipcodeDAO zipcodeDAO) {
		this.zipcodeDAO = zipcodeDAO;
	}

	@Override
	public List getAllZipcode(ZipcodeDTO dto) {
		
		return zipcodeDAO.getAllZipcode(dto);
	}
	
}
